package com.traffic.fuwu.service.impl;

import java.util.ArrayList;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.traffic.fuwu.dao.EmployeeMapper;
import com.traffic.fuwu.mybatis.pojo.Employee;
import com.traffic.fuwu.service.EmployeeService;
@Service
public class EmployeeServiceImpl implements EmployeeService{
	@Autowired
	private EmployeeMapper employeeMapper;

	@Override
	public List<Employee> getEmployeeList(String empCode, String empName,
			String IDcard, String deptName, String appKey, int startRow,
			int pageSize) {
		List<Employee> sb = new ArrayList<>();
		try {
		sb=employeeMapper.getEmployeeList(empCode, empName, IDcard, deptName, appKey, startRow, pageSize);
		} catch (Exception e) {
		e.printStackTrace();
		}
		return sb;
	}

	@Override
	public int getEmployeeCount(String empCode, String empName, String IDcard,
			String deptName, String appKey) {
		int count = 0;
		try {
	        count = employeeMapper.getEmployeeCount(empCode, empName, IDcard, deptName, appKey);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return count;
	}

}
